package com.hmall.search.service;

import com.hmall.common.PageDto;
import com.hmall.search.dto.SearchDto;
import com.hmall.search.pojo.ItemDoc;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ISearchService {
    // 批量导入商品
    void bulk() throws Exception;
    // 分页搜索
    PageDto<ItemDoc> search(SearchDto params) throws Exception;
    //获取筛选条件
    Map<String, List<String>> getFilters(SearchDto params) throws Exception;
    //获取关键词推荐
    List<String> getSuggestion(String prefix) throws Exception;
    //新增或者修改文档
    void addOrUpdateItemDoc(ItemDoc itemDoc) throws IOException;
    //删除文档
    void deleteItemDoc(Long id) throws IOException;
}
